﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="tophd2.Models.Service" %>
<%@ Import Namespace="tophd2.Models.Entity" %>
<div class="clearfix" id="mTop">
    <div class="fdFrm">
        <div id="closeFind">
            <img class="cl" src="/App_Themes/Theme.Wap/Images/x_icon.png" alt="" />
        </div>
        <form method="get" action="">
        <input type="image" class="fs" src="/App_Themes/Theme.Wap/Images/find_icon_search.png"
            onclick="do_search();return false;" />
        <input type="text" class="akey1 viewbtn" name="keyword" value="" id="viewbtn" autocomplete="off"
            style="width: 1249px;" />
        <img src="/App_Themes/Theme.Wap/Images/loading3.gif" alt="loading phim hanh dong, phim 18+"
            class="imgload3" style="display: none; position: absolute; top: 14px; right: 50px;
            z-index: 65000;" />
        </form>
        <script type="text/javascript" src="/App_Themes/Theme.Wap/JS/jsmheader.js"></script>
        <div id="mp-autocomplete-results" class="search-autocomplete" style="display: none;
            width: 1289px;">
            <div class="">
                <div class="autocomplete-border">
                    <ul id="autocomplete-list" class="">
                        <li class="autocomplete-item"><a href="/" class="search-for autocomplete-activeItem">
                            Tìm kiếm với <span class="keyshow"></span></a></li>
                        <li class="search-item search0">
                            <ul class="search1">
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="notif_boxshadow" style="display: none;">
                <div class="ntifboxshd_right png" style="float: right">
                </div>
                <div class="ntifboxshd_left png" style="float: left">
                </div>
                <div class="ntifboxshd_center">
                </div>
            </div>
        </div>
    </div>
    <div class="l menuhi2">
        <img id="mS" src="/App_Themes/Theme.Wap/Images/menu_icon.png" alt="menu" />
        <div class="menu">
            <div class="row firstRow">
                <div class="l kp3">
                    tophd.vn</div>
                <!------
				<div class="r">
					<a class="lg"><img src="http://m.tophd.vn/skin/black/images/avatar_icon.png">Đăng nhập</a>
					<span class="sp1">|</span><a class="rg"> Đăng ký</a>
				</div>
				----->
            </div>
            <div id="mnBottom">
                <div class="rgs">
                    <div class="lgFrmcont lblpr2">
                    </div>
                </div>
                <div class="lgFrm">
                    <div class="lgFrmcont">
                    </div>
                </div>
                <% CategoryService s1 = new CategoryService();

                   List<Category> videoCategory = s1.GetCategory(0, 9); 
                %>
                <div class="mn">
                    <a class="row" href="/"><span class="a1">Trang chủ</span></a>
                    <% if (videoCategory != null)
                       {%>
                    <% foreach (var cate in videoCategory)
                       { %>
                    <% if (cate.IsLeaf == 1)
                       { %>
                    <a href="/Category/VideoByCategory?categoryId=<%= cate.CategoryId %>" class="row"><span class="a1">
                        <%=cate.Name %></span></a>
                    <% }
                       else
                       { %>
                    <a class="row" href="JavaScript:void(0);"><span class="a1" id="cate<%=cate.CategoryId %>"
                        onclick="toggleMenu(<%=cate.CategoryId %>);">
                        <%=cate.Name %></span></a>
                    <%
                       }
                       if (cate.IsLeaf == 0)
                       {
                           List<Category> pListCate2 = s1.GetCategory(cate.CategoryId, 9);
                           if (pListCate2 != null)
                           { %>
                    <div class="cat_theloai_mn" id="cat<%=cate.CategoryId %>mn" style="display: none;">
                        <% foreach (Category cate2 in pListCate2)
                           { %>
                        <a class="row" href="/Category/VideoByCategory?categoryId=<%= cate2.CategoryId %>"><span
                            class="a3">
                            <%=cate2.Name %></span></a>
                        <% } %>
                    </div>
                    <% }
                       }
                    %>
                    <%}%>
                    <%} %>
                    <hr class="darkGray" />
				    <div class="ot">
					    <div style="line-height: 41px;">Tải ứng dụng kho phim</div>
					    <a class="btn"><span class="a7">Android</span></a>
					    <a class="btn"><span class="a8">IOS</span></a>
				    </div>  
                </div>
            </div>
        </div>
    </div>
    <div id="mnFind" class="r">
        <img style="padding-top: 12px;" src="/App_Themes/Theme.Wap/Images/find_icon.png"
            alt="kho phim" /></div>
    <span class="b1"><a href="/">
        <img style="width: 60%; max-width: 200px;" src="/App_Themes/Theme.Wap/Images/logo.png"
            border="0" /></a></span>
</div>
<script type="text/javascript">

    //    $(document).ready(function () {
    //        $('#quocgia').click(function () {
    //            $('.quocgia_mn').slideToggle("fast");
    //        });
    //    });
    //    $(document).ready(function () {
    //        $('#cat_theloai').click(function () {
    //            $('.cat_theloai_mn').slideToggle("fast");
    //        });
    //    });

    function toggleMenu(cateid) {
        $('#cat' + cateid + 'mn').slideToggle("fast");
    }
</script>
